package com.workerhelping.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_assist")
public class Assist implements Serializable {
    @TableId
    private Integer id;
    // 发布帮扶日期
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date assistDate;
    private String  year;
    // 帮扶金额
    private double money;
    // 帮扶类别id
    private Integer icId;
    // 帮扶类别
    @TableField(exist = false,select = false)
    private IncomeCategory incomeCategory;
    // 职工id
    private Integer wId;
    @Version
    // 乐观锁version
    private Integer version;


    public Assist(Date assistDate, String year,double money,Integer icId, Integer wId) {
        this.assistDate = assistDate;
        this.year = year;
        this.money = money;
        this.icId = icId;
        this.wId = wId;
    }
}
